/*
 *
 *
const_func.cpp: In member function ‘void Student::whoami() const’:
const_func.cpp:13:25: error: increment of member ‘Student::age’ in read-only object
   13 |                         age++;
      |                         ^~~

 */

#include <iostream>
using namespace std;
class Student{
	private:
		int age;
		string name;
	public:
		Student(int age, const string &name){
			this->age = age;
			this->name = name;
		}
		void whoami(void) const{
			age++;  
			cout << "我是: " << name << " 我今年: " << age << endl;
		}
};
int main(void){
	Student s1(22, "张三");
	s1.whoami();
	return 0;
}
